from . import flutter

TextStyle = flutter.TextStyle
Container = flutter.Container
Center = flutter.Center
Text = flutter.Text
Stack = flutter.Stack
Positioned = flutter.Positioned
Transform = flutter.Transform
LinearGradient = flutter.LinearGradient
Colors = flutter.Colors
TextAlign = flutter.TextAlign
EdgeInsets = flutter.EdgeInsets
FontWeight = flutter.FontWeight
FontStyle = flutter.FontStyle
BoxShadow = flutter.BoxShadow
BoxShape = flutter.BoxShape
RichText = flutter.RichText
TextSpan = flutter.TextSpan
TextOverflow = flutter.TextOverflow
BorderRadius = flutter.BorderRadius
Offset = flutter.Offset
Scaffold = flutter.Scaffold
AppBar = flutter.AppBar
IconButton = flutter.IconButton
Icon = flutter.Icon
Icons = flutter.Icons
TextButton = flutter.TextButton
OutlinedButton = flutter.OutlinedButton
ContainedButton = flutter.ContainedButton
Column = flutter.Column
Children = flutter.Children
def buttons():
    # return Column(
    #     children=[
    #         TextButton(
    #             icon=Icon(Icons.bookmark),
    #             label=Text("TEXT BUTTON"),
    #         ),
    #         OutlinedButton(
    #             icon=Icon(Icons.add),
    #             label=Text("OUTLINED BUTTON"),
    #         ),
    #         ContainedButton(
    #             icon=Icon(Icons.start),
    #             label=Text("CONTAINED BUTTON"),
    #         )
    #     ]
    # )
    return Scaffold(
        appBar=AppBar(
            title=Text('Buttons'),
            leading=Icon(Icons.menu),
            actions=[
                Icon(Icons.favorite),
                Container(
                    padding=EdgeInsets.symmetric(16),
                    child=Icon(Icons.search),
                ),
                Icon(Icons.more_vert),
            ],
        ),
        body=Children(
            children=[
                TextButton(
                    icon=Icon(Icons.card_membership),
                    label=Text("Cards"),
                    href='cards.html',
                ),
                OutlinedButton(
                    icon=Icon(Icons.check),
                    label=Text("Checkboxes"),
                    href='checkboxes.html',
                ),
                ContainedButton(
                    icon=Icon(Icons.smart_toy),
                    label=Text("Chips"),
                    href='chips.html',
                )
            ]
        )
    )


def run_app():
    test_ = buttons()
    javascript.document.body.appendChild(test_.render())

run_app()